package com.daxiong.pattern.factory.demo;

import org.junit.Test;

/**
 * 测试用户买车
 *
 * @author sunyanxiong
 * @date 2017/4/23
 */
public class TestCustomer {

    @Test
    public void test(){
        System.out.println("老板给我介绍下奔驰 C180");
        BenzFactory benzFactory = new BenzC180Factory();
        benzFactory.createCar();
        System.out.println("奔驰C180 ok");

        System.out.println("老板给我介绍下奔驰 E260");
        BenzFactory benzFactory1 = new BenzE260Factory();
        benzFactory1.createCar();
        System.out.println("奔驰 E260 ok");
    }

}
